﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Axe
{
    public static class EnumUtils
    {
        public static bool IsInRange<T>(T item, params T[] values)
            where T:struct
        {
            if (values != null && values.Length > 0)
            {
                foreach (T p in values)
                {
                    if (item.Equals(p))
                        return true;
                }
                
                return false;
            }
            else
                return false;
        }
    }
}
